Ext.onReady(function(){
    Ext.QuickTips.init();//想要弹出层提示就得有这个
    var myTree = new Ext.tree.TreePanel({
        id: 'api-tree',
        region: 'west',
        split: true,
        header: false,
        width: 280,
        minSize: 175,
        maxSize: 500,
		collapseMode: 'mini',
        collapsible: true,
        margins: '0 0 5 5',
        cmargins: '0 0 0 0',
        rootVisible: false,
        lines: false,
        autoScroll: true,
        animCollapse: false,
        animate: false,
        collapseMode: 'mini',
        plugins: 'filterBar',
        root: new Ext.tree.AsyncTreeNode({
            children: [{
                id: 'level',
                text: '用户类型',
                children: [{
                    id: 'allLevel',
                    text: '全部',
                    leaf: true
                }, {
                    id: 'noSupport',
                    text: '无支持',
                    leaf: true
                }, {
                    id: 'month',
                    text: '包月',
                    leaf: true
                }, {
                    id: 'year',
                    text: '包年',
                    leaf: true
                }, {
                    id: 'always',
                    text: '终身',
                    leaf: true
                }]
            }, {
                id: 'outOfDate',
                text: '是否过期',
                children: [{
                    id: 'allOutOfDate',
                    text: '全部',
                    leaf: true
                }, {
                    id: 'notOutOfDate',
                    text: '未过期',
                    leaf: true
                }, {
                    id: 'alreadyOutOfDate',
                    text: '已过期',
                    leaf: true
                }]
            }, {
                id: 'report',
                text: '统计图表',
                children: [{
                    id: 'levelReport',
                    text: '按用户类型',
                    leaf: true
                }, {
                    id: 'outOfDateReport',
                    text: '按是否过期',
                    leaf: true
                }]
            }]
        })
    });
     
    new Ext.Viewport({
        layout: 'border',
        items: [myTree, {
            region: 'center',
            html: '1234'
        }]
    });
});
